from PyQt5.Qt import *
from demo1 import Ui_MainWindow
import sys

app = QApplication(sys.argv)

# 封装组件
mainWindow = QMainWindow()
ui = Ui_MainWindow();
ui.setupUi(mainWindow)
mainWindow.show()

sys.exit(app.exec_())